<template>
  <!--根div-->
  <div class="login_container">
    <!--登录表单-->
    <div class="login_form">
      <h2 class="title">稻草快速开发平台</h2>

      <el-form ref="formRef" :model="loginForm">
        <!--用户名        -->
        <el-form-item>
          <el-input v-model="loginForm.account" placeholder="请输入账号">
            <template #prefix>
              <el-icon class="el-input__icon">
                <user/>
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <!--密码      -->
        <el-form-item>
          <el-input v-model="loginForm.password" type="password" placeholder="请输入密码">
            <template #prefix>
              <el-icon class="el-input__icon">
                <lock/>
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <!--      记住我-->
        <div class = "rememberMe">
          <el-checkbox v-model="loginForm.rememberMe" label="记住密码" size="large"/>
          <!--        忘记密码-->
          <el-text class="forgetPwd mx-1" type="primary">忘记密码？</el-text>
        </div>
        <!--分割线-->
        <el-divider>其他登录方式</el-divider>
<!--        其他登录方式的icon-->
        <div class="other_login">
          <el-icon class="other_login_item"><circle-plus-filled /></el-icon>
          <el-icon class="other_login_item"><circle-check-filled /></el-icon>
          <el-icon class="other_login_item"><tools /></el-icon>
        </div>
        <el-form-item>
          <!--登录按钮-->
          <el-button style="width: 100%" type="primary">登录</el-button>
        </el-form-item>
      </el-form>

    </div>
  </div>
</template>
<script setup>
//导入ref
import {ref} from "vue";
import {CircleCheckFilled, CirclePlusFilled,
  Lock, Tools, User} from "@element-plus/icons-vue";



//声明表单绑定值
const loginForm = ref({
  account: undefined,
  password: undefined,
  rememberMe: undefined,
});
</script>
<style lang="scss" scoped>
  .login_container {
    background-image: url("../assets/bgimg/1.jpg");
    background-size: 100%;
    display: flex;
    justify-content: end;
    height: 100vh;
  }
  .login_form{
    width: 50%;
    background-color: white;
    justify-content: center;
    align-items: center;
    //设置换行
    flex-direction: column;
    display: flex;
    .title{
      margin-bottom: 20px;

    }
    .rememberMe{
      display: flex;
      justify-content: space-between;
      align-items: center;
      .forgetPwd{
        cursor: pointer;
      }
    }
    //其他登录方式
    .other_login{
      display: flex;
      justify-content: center;
      margin-bottom: 20px;
      .other_login_item{
        margin-left: 30px;
        margin-right: 30px;
        cursor: pointer;
      }
    }
    //设置form表单的宽度
    .el-form{
      width: 50%;

    }
    .el-form-item{
      width: 100%;
    }

  }
</style>